<template>
  <div class="wrap">
    <van-nav-bar
      title="信息收集"
      placeholder
      fixed
      left-arrow
      style="background: #fff"
      @click="toBack"
    />
    <div class="wrap_cont">
      <van-tabs v-model:active="tabActive">
        <van-tab
          :title="item.label"
          v-for="(item, i) in tabData"
          :key="i"
        ></van-tab>
      </van-tabs>
      <div class="shoujizhong" v-if="tabActive == '0'">
        <van-cell
          center
          :title="item.title"
          is-link
          v-for="(item, i) in shoujiList"
          :key="i"
        />
      </div>
      <div class="shoujizhong lishi" v-else>
        <van-cell
          center
          :title="item.title"
          :label="item.subTitle"
          is-link
          v-for="(item, i) in lishiList"
          :key="i"
        />
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from "vue";
const toBack = () => {
  window.history.back();
};
const tabActive = ref("0");
const tabData = [
  {
    label: "收集中",
  },
  {
    label: "我的历史",
  },
];
const shoujiList = [
  {
    title: "个人信息_复用旧系统",
  },
  {
    title: "个人信息_复用旧系统",
  },
  {
    title: "个人信息_复用旧系统",
  },
  {
    title: "个人信息_复用旧系统",
  },
  {
    title: "个人信息_复用旧系统",
  },
];
const lishiList = [
  {
    title: "个人信息_复用旧系统",
    subTitle: "2022-02-22 12:33:44",
  },
  {
    title: "个人信息_复用旧系统",
    subTitle: "2022-02-22 12:33:44",
  },
  {
    title: "个人信息_复用旧系统",
    subTitle: "2022-02-22 12:33:44",
  },
  {
    title: "个人信息_复用旧系统",
    subTitle: "2022-02-22 12:33:44",
  },
  {
    title: "个人信息_复用旧系统",
    subTitle: "2022-02-22 12:33:44",
  },
];
</script>

<style lang="scss" scoped>
.wrap {
  &_cont {
    margin-top: 4px;
    ::v-deep(.van-tabs__line) {
      background: #0dc678;
    }
    ::v-deep(.van-cell) {
      height: 48px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 14px;
      color: #272b2d;
    }
    ::v-deep(.lishi .van-cell) {
      height: 60px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 14px;
      color: #272b2d;
    }
    ::v-deep(.lishi .van-cell__label) {
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #676b6b;
    }
  }
}
</style>
